package com.bimiaomiao.sentinel.sku.service;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.alibaba.fastjson.JSON;
import com.bimiaomiao.sentinel.sku.vo.SkuVo;
import org.springframework.stereotype.Component;

import java.util.ArrayList;

/**
 * @description:
 * @package com.bimiaomiao.sentinel.sku.service
 * @who MiaoMiao "Sprout" BI
 * @date 2021-03-02 16:00:58
 */
@Component
public class SkuService {

    @SentinelResource("infoService")
    public String info()
    {
        ArrayList<SkuVo> skuVos = new ArrayList<>();
        skuVos.add(new SkuVo(100001, "测试商品001", "9238924292"));
        skuVos.add(new SkuVo(100002, "戴尔电脑", "9238924293"));
        skuVos.add(new SkuVo(100003, "小米手机", "9238924294"));
        return JSON.toJSONString(skuVos);
    }
}
